🤖 feat: enhance telemetry with runtime, platform, and usage tracking#932
Merged
🤖 feat: enhance telemetry with runtime, platform, and usage tracking#932
Conversation
Add comprehensive telemetry enhancements for better product insights: Runtime & Platform Data: - Add runtimeType (local/worktree/ssh) to workspace_created and message_sent - Add frontend platform info (userAgent, platform) for mux server mode - Enhance backend platform data with nodeVersion and bunVersion New Events: - stream_completed: Track completion vs interruption, duration, output tokens - provider_configured: Track which providers users set up (not keys!) - command_used: Track slash command usage patterns - voice_transcription: Track voice input adoption and success rate Enhanced Events: - app_started: Add vimModeEnabled for vim mode adoption - message_sent: Add thinkingLevel for extended thinking usage All metrics use base-2 rounding for privacy-preserving numerical data. _Generated with `mux`_
Move rounding logic into centralized tracking functions so callers don't need to manually call roundToBase2(). This ensures consistent privacy-preserving transformations across all telemetry call sites. Changes: - Add src/common/telemetry/tracking.ts with all tracking functions - Tracking functions accept raw values and handle rounding internally - Remove roundToBase2/getFrontendPlatformInfo from public exports - Simplify useTelemetry hook to delegate to tracking functions - Update WorkspaceStore, useVoiceInput, chatCommands to use new API The public API is now cleaner: - trackMessageSent(model, mode, messageLength, ...) - no rounding needed - trackStreamCompleted(model, interrupted, durationSecs, outputTokens) - trackVoiceTranscription(audioDurationSecs, success) _Generated with `mux`_
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add comprehensive telemetry enhancements for better product insights.
Runtime & Platform Data
runtimeType(local/worktree/ssh) toworkspace_createdandmessage_sentmux servermodenodeVersionandbunVersionNew Events
stream_completedprovider_configuredcommand_usedvoice_transcriptionEnhanced Events
app_startedvimModeEnabledmessage_sentthinkingLevelPrivacy
All metrics use base-2 rounding for privacy-preserving numerical data. No sensitive information (SSH hosts, API keys, project names, etc.) is ever sent.
Generated with
mux